import { reactive, ref } from "vue";

export default function InitHook() {
  const searchForm = reactive<Partial<InsuranceCompany.SearchForm>>({
    createTimeList: [],
    agentIdList: [],
    idList: [],
    channelIdList: [],
    unitList: [],
    pageNum: 1,
    pageSize: 100,
    total: 0
  });
  const tableRef = ref<any>(null);
  const tableData = ref<Array<InsuranceCompany.ListRows>>([]);
  const dialogOpts = reactive<Base.DialogOpts>({
    title: "",
    width: "520px",
    component: "",
    visible: false,
    type: 1,
    passData: {}
  });

  return {
    searchForm,
    tableData,
    dialogOpts,
    tableRef
  };
}
